import request from '@/utils/request'
// const BASE_API_URL = '/admin/wx.member'
export function getAllTags() {
  return request({
    url: '/admin/wx.member/get_all_tags',
    method: 'get'
  })
}
export function createTag(name) {
  return request({
    url: '/admin/wx.member/add_tag',
    method: 'POST',
    data: {
      name
    }
  })
}
export function updateTag(id, name) {
  return request({
    url: '/admin/wx.member/update_tag',
    method: 'PUT',
    params: {
      id,
      name
    }
  })
}
export function deleteTag(id) {
  return request({
    url: '/admin/wx.member/del_tag',
    method: 'DELETE',
    params: {
      id
    }
  })
}
export function setMemberTags(openid, tags, newset = [], unset = []) {
  return request({
    url: '/admin/wx.member/set_member_tags',
    method: 'PUT',
    params: {
      openid,
      tags,
      newset,
      unset
    }
  })
}
